﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="BLL.aspx.cs" Inherits="BLL" %>

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MsnData.DAL;

namespace MsnData.BLL
{
    /// <summary>
    /// Author:喻旻
    /// Create date: <%=DateTime.Now.Date.ToString("yyyy-MM-dd") %>
    /// Description: <%=TableDesc %>
    /// </summary>
    public class <%=TableName_Emoney %>BLL:BLL.IBLL.IImport
    {
        public void Import()
        {
            <%=TableName_Emoney %>DAL dal = new <%=TableName_Emoney %>DAL();
            var time= dal.GetMaxTime();
            var lst = dal.GetLstFromEmoney(time);
            foreach (var c in lst)
            {
                if (time != null)
                {
                    if (dal.IsExists(<%=Ps %>))
                    {
                        dal.Update(c);
                    }else
                    {
                       dal.Add(c);
                    }
                }
                else
                {
                    dal.Add(c);
                }
            }
        }
    }
}
